<?php

namespace IDock\Insurance\DAJIA\Response;

use IDock\Http\Response;
use IDock\Insurance\DAJIA\Response\AllDAJIAResponse;
use IDock\Printer\NonCar\NonCarProductListPrinter;
use IDock\Printer\NonCar\NonCarProductPrinter;
use IDock\Printer\NonCar\NonCarSubCoveragePrinter;
use IDock\Printer\UnderwritingRecallPrinter;

class NonCarProductListResponse extends AllDAJIAResponse
{

    public $seat = 5;

    public function printerInit(): Response
    {
        $list = [
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_087',
                'planName' => '四川单交驾意险-30元',
                'coverageList' => [
                    [
                        'subCode' => '067901',
                        'subName' => '意外伤害身故和伤残',
                        'amount' => 10,
                        'premium' => '30000/座',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外身故、伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => 20,
                        'premium' => '5000/座',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ]
                ],
            ],
            [
                'productCode' => '0679',
                'productName' => '',
                'planCode' => 'FA_0679_001',
                'planName' => '畅驾保方案一',
                'coverageList' => [
                    [
                        'subCode' => '067901',
                        'subName' => '意外伤害身故和伤残',
                        'amount' => 8 * $this->seat,
                        'premium' => 100000 * $this->seat,
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外身故、伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => 10 * $this->seat,
                        'premium' => 10000 * $this->seat,
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => 6 * $this->seat,
                        'premium' => 3600 * $this->seat,
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_009',
                'planName' => '驾乘无忧标准版(60 元)',
                'coverageList' => [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '25',
                        'premium' => '60000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '20',
                        'premium' => '5000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '15',
                        'premium' => '3600',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ]
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_044',
                'planName' => '驾乘无忧升级版',
                'coverageList' => [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '50',
                        'premium' => '100000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '30',
                        'premium' => '8000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '20',
                        'premium' => '5400',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_010',
                'planName' => '驾乘无忧豪华版 (150 元)',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '80',
                        'premium' => '150000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '40',
                        'premium' => '10000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '30',
                        'premium' => '9000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_052',
                'planName' => '畅驾保青春版方案一',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '40',
                        'premium' => '150000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '50',
                        'premium' => '10000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '20',
                        'premium' => '3600',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '40',
                        'premium' => '150000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '5',
                        'premium' => '1000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '5',
                        'premium' => '100',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '50000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],

                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_053',
                'planName' => '畅驾保青春版方案二',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '45',
                        'premium' => '200000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '50',
                        'premium' => '20000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '30',
                        'premium' => '5400',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '45',
                        'premium' => '200000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '5',
                        'premium' => '1000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '10',
                        'premium' => '100',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '100000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_054',
                'planName' => '畅驾保青春版方案三',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '50',
                        'premium' => '300000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '60',
                        'premium' => '30000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '40',
                        'premium' => '5400',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '50',
                        'premium' => '300000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '5',
                        'premium' => '1500',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '5',
                        'premium' => '150',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '150000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_055',
                'planName' => '畅驾保青春版方案四',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '40',
                        'premium' => '700000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '70',
                        'premium' => '90000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '40',
                        'premium' => '14400',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '40',
                        'premium' => '700000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '10',
                        'premium' => '3500',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '8',
                        'premium' => '350',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '350000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（房屋及室内附属设备）',
                        'amount' => '90',
                        'premium' => '800000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '房屋及室内附属设备',
                        'responsibilityCode' => '08181701',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内装修）',
                        'amount' => '90',
                        'premium' => '800000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内装修',
                        'responsibilityCode' => '08181702',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内财产）',
                        'amount' => '90',
                        'premium' => '800000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内财产',
                        'responsibilityCode' => '08181703',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_056',
                'planName' => '畅驾保青春版方案五',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '60',
                        'premium' => '900000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '125',
                        'premium' => '100000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '80',
                        'premium' => '21600',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '60',
                        'premium' => '900000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '10',
                        'premium' => '5000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '8',
                        'premium' => '500',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '500000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（房屋及室内附属设备）',
                        'amount' => '145',
                        'premium' => '1200000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '房屋及室内附属设备',
                        'responsibilityCode' => '08181701',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内装修）',
                        'amount' => '145',
                        'premium' => '1200000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内装修',
                        'responsibilityCode' => '08181702',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内财产）',
                        'amount' => '145',
                        'premium' => '1200000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内财产',
                        'responsibilityCode' => '08181703',
                    ],
                ],
            ],
            [
                'productCode' => '0684',
                'productName' => '',
                'planCode' => 'FA_0684_057',
                'planName' => '畅驾保青春版方案六',
                'coverageList' =>  [
                    [
                        'subCode' => '067901',
                        'subName' => '机动车辆驾乘人员意外伤害保险',
                        'amount' => '80',
                        'premium' => '1000000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害身故和伤残',
                        'responsibilityCode' => '06790101',
                    ],
                    [
                        'subCode' => '12T006',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '130',
                        'premium' => '120000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外医疗',
                        'responsibilityCode' => '12T00601',
                    ],
                    [
                        'subCode' => '12T005',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '130',
                        'premium' => '27000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '意外伤害住院津贴',
                        'responsibilityCode' => '12T00501',
                    ],
                    [
                        'subCode' => '06T031',
                        'subName' => '附加法定节假日意外伤害双倍给付保险',
                        'amount' => '80',
                        'premium' => '1000000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '法定节假日意外伤害双倍给付',
                        'responsibilityCode' => '06T03101',
                    ],
                    [
                        'subCode' => '08T018',
                        'subName' => '附加个人随车物品损失保险',
                        'amount' => '10',
                        'premium' => '6000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '个人随车物品损失',
                        'responsibilityCode' => '08T01801',
                    ],
                    [
                        'subCode' => '12T023',
                        'subName' => '附加救护车费用保险',
                        'amount' => '8',
                        'premium' => '600',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '意外伤害救护车费用',
                        'responsibilityCode' => '12T02301',
                    ],
                    [
                        'subCode' => '12T027',
                        'subName' => '附加特定传染病保险',
                        'amount' => '10',
                        'premium' => '600000',
                        'rate' => '',
                        'taxType' => '0',
                        'responsibility' => '特定传染病身故',
                        'responsibilityCode' => '12T02704',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（房屋及室内附属设备）',
                        'amount' => '180',
                        'premium' => '2000000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '房屋及室内附属设备',
                        'responsibilityCode' => '08181701',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内装修）',
                        'amount' => '180',
                        'premium' => '2000000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内装修',
                        'responsibilityCode' => '08181702',
                    ],
                    [
                        'subCode' => '081817',
                        'subName' => '民用燃气用户家庭财产（2021版）（室内财产）',
                        'amount' => '180',
                        'premium' => '2000000',
                        'rate' => '',
                        'taxType' => '1',
                        'responsibility' => '室内财产',
                        'responsibilityCode' => '08181703',
                    ],
                ],
            ],
        ];

        $printer = new NonCarProductListPrinter();

        foreach ($list as $item) {
            $amount = $premium = '0';
            $productPrinter = new NonCarProductPrinter();
            $productPrinter->productCode = $item['productCode'] ?? '';//产品编码
            $productPrinter->productName = $item['productName'] ?? '';//产品名称
            $productPrinter->productType = '驾意险';
            $productPrinter->productDesc = '';
            $productPrinter->planCode    = $item['planCode'] ?? '';//方案代码
            $productPrinter->planName    = $item['planName'] ?? '';//方案名称
            $productPrinter->maxQuantity = '1';//最大购买份数
//            if($productPrinter->planCode == 'FA_0679_001'){
//                $productPrinter->maxQuantity = 5;
//            }
            foreach ($item['coverageList'] ?? [] as $sub) {
                $subCoverage = new NonCarSubCoveragePrinter();
                $subCoverage->subCode = $sub['subCode'] ?? '';
                $subCoverage->subName = $sub['subName'] ?? '';
                $subCoverage->amount  = $sub['premium'] ?? '0';
                $subCoverage->premium = $sub['amount'] ?? '';

                //if ((float)$sub['premium'] and (float)$sub['amount']) {
                //    $subCoverage->rate    = round($sub['amount'] / $sub['premium'] * 1000);
                //}

                $subCoverage->argc['responsibility'] = $sub['responsibility'];
                $subCoverage->argc['responsibilityCode'] = $sub['responsibilityCode'];
                $subCoverage->argc['taxType'] = $sub['taxType'];

                $amount  += (float)$subCoverage->amount;
                $premium += (float)$subCoverage->premium;

                $productPrinter->subCoverageAppend($subCoverage);
            }
            $productPrinter->unitAmount = (string)$amount;
            $productPrinter->premium    = (string)$premium;

            $printer->productListAppend($productPrinter);
        }

        $this->printer = $printer;
        return $this;
    }
}
